/* 游戏详情页样式 */

/* 主要内容布局 */
.game-detail {
    padding: 2rem 1rem;
    max-width: 1440px;
    margin: 0 auto;
    min-height: calc(100vh - 70px - 300px);
    margin-top: 70px;
}

/* 游戏头部信息 */
.game-header {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.game-cover {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin: 0;
}

.game-meta {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.rating-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rating-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.game-categories {
    display: flex;
    gap: 0.75rem;
}

.category-tag {
    background-color: rgba(108, 92, 231, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.game-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.play-button {
    background-color: var(--accent-color);
    color: var(--background-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
}

.action-button {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-button:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 游戏内容区域 */
.game-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

/* 游戏说明部分 */
.game-description {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
}

.description-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.game-screenshots {
    margin-top: 2rem;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.screenshot {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
}

.screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.screenshot:hover img {
    transform: scale(1.05);
}

/* 侧边栏 */
.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-section {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.achievement-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    color: var(--text-primary);
    font-size: 0.875rem;
    margin: 0;
}

.achievement-desc {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0.25rem 0 0 0;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.3s ease;
}

.leaderboard-item:hover {
    background-color: rgba(108, 92, 231, 0.1);
}

.rank {
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.player-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-name {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.player-score {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .game-header {
        grid-template-columns: 300px 1fr;
    }

    .game-content {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 768px) {
    .game-header {
        grid-template-columns: 1fr;
    }

    .game-cover {
        max-width: 300px;
        margin: 0 auto;
    }

    .game-content {
        grid-template-columns: 1fr;
    }

    .game-actions {
        flex-wrap: wrap;
    }

    .play-button {
        width: 100%;
        justify-content: center;
    }
}

/* 全屏模式 */
.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 1000;
    display: none;
}

.fullscreen-mode.active {
    display: block;
}

.fullscreen-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: rgba(19, 17, 28, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-mode:hover .fullscreen-header {
    opacity: 1;
}

.game-title-small {
    color: white;
    font-size: 1.25rem;
    margin: 0;
}

.exit-fullscreen {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* 截图查看器 */
.screenshot-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(19, 17, 28, 0.9);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.screenshot-viewer.active {
    display: flex;
}

.viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.viewer-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.viewer-close {
    position: absolute;
    top: -2rem;
    right: -2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.5rem;
}
